import 'package:flutter/material.dart';

class HowToPlayPage extends StatelessWidget {
  const HowToPlayPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // final isDark = Theme.of(context).brightness == Brightness.dark;
    return Scaffold(
      appBar: AppBar(title: const Text('游戏说明')),
      body: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            const Text(
              '玩法:',
              style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
            ),
            const SizedBox(height: 8),
            const Text('1. 点击空白格子选择要填入数字的位置'),
            const Text('2. 从底部数字键盘选择要填入的数字'),
            const Text('3. 目标是在每行、每列和每个3x3小九宫格内填入1-9的数字且不重复'),
            const SizedBox(height: 16),
            const Text(
              '功能按钮:',
              style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
            ),
            const SizedBox(height: 8),
            const Text('提示: 自动填入一个正确的数字'),
            const Text('清除: 清除当前选中格子的数字'),
            const Text('检查: 检查当前已填入的数字是否正确'),
            const Text('重置: 重置当前游戏，回到初始状态'),
            const Text('新游戏: 开始一个新的数独游戏'),
            const SizedBox(height: 16),
            const Text(
              '难度说明:',
              style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
            ),
            const SizedBox(height: 8),
            const Text('简单: 约40-45个提示数字'),
            const Text('中等: 约35-40个提示数字'),
            const Text('困难: 约30-35个提示数字'),
            const Spacer(),
            Center(
              child: ElevatedButton(
                onPressed: () => Navigator.pop(context),
                child: const Text('返回'),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
